﻿namespace ComicQ.Domain
{
    class Program
    {
        static void Main()
        {
//            var proxy = new Service1Client();

//            var d = new Data {A1 = true, A2 = "tes"};

//            var a = new CompositeType();
//            a.BoolValue = true;
//            a.StringValue = "oke";

////            Console.WriteLine(proxy.GetData(10));
//            Console.WriteLine(proxy.GetDataUsingDataContract(a).StringValue);
//            Console.ReadLine();
//            ServiceReference1Client a = new ServiceReference1Client();
//            ServiceReference1 proxy = new ServiceReference1();
//            using (var session = NHibernateHelper.OpenSession())
//            {
//                using (var transaction = session.BeginTransaction())
//                {
//                    var member = new Member()
//                    {
//                        Username = "a1",
//                        Password = "a2",
//                        Name = "a3",
//                        Address = "a4",
//                        Phone = "a5",
//                        Email = "a6",
//                        JoinDate = new DateTime(2000, 1, 1)
//                    };

//                    var staff = new Staff()
//                    {
//                        Username = "b1",
//                        Password = "b2",
//                        Name = "b3",
//                        Address = "b4",
//                        Phone = "b5",
//                        Email = "b6",
//                        JoinDate = new DateTime(2002, 1, 1)
//                    };

//                    var orderStatus = new OrderStatus()
//                    {
//                        Detail = "OK"
//                    };

//                    var orderDetailStatus = new OrderDetailStatus()
//                    {
//                        Detail = "Belum kembali"
//                    };

//                    var comicStatus = new ComicStatus()
//                    {
//                        Detail = "Dipinjam"
//                    };

//                    var rent = new Rent()
//                    {
//                        Detail = 1000
//                    };

//                    var year = new Year()
//                    {
//                        Detail = 2000
//                    };

//                    var publisher = new Publisher()
//                    {
//                        Detail = "Elex"
//                    };

//                    var author = new Author()
//                    {
//                        Detail = "Gosho"
//                    };

//                    var warranty = new Warranty()
//                    {
//                        Detail = "ktp"
//                    };

//                    var comic1 = new Comic()
//                    {
//                        Title = "Conan 30",
//                        Author = author,
//                        Publisher = publisher,
//                        Year = year,
//                        Rent = rent,
//                        ComicStatus = comicStatus
//                    };

//                    var comic2 = new Comic()
//                    {
//                        Title = "Conan 32",
//                        Author = author,
//                        Publisher = publisher,
//                        Year = year,
//                        Rent = rent,
//                        ComicStatus = comicStatus
//                    };

//                    var order = new Order()
//                    {
//                        Member = member,
//                        Staff = staff,
//                        RentDate = new DateTime(2000, 1, 1),
//                        ReturnDate = new DateTime(2000, 1, 5),
//                        Warranty = warranty,
//                        WarrantyNumber = "1029091303",
//                        Total = 2000,
//                        OrderStatus = orderStatus
//                    };

//                    var orderDetail1 = new OrderDetail()
//                    {
//                        Order = order,
//                        Comic = comic1,
//                        OrderDetailStatus = orderDetailStatus
//                    };

//                    var orderDetail2 = new OrderDetail()
//                    {
//                        Order = order,
//                        Comic = comic2,
//                        OrderDetailStatus = orderDetailStatus
//                    };

//                    session.Save(orderDetail1);
//                    session.Save(orderDetail2);

//                    transaction.Commit();

//                    Console.WriteLine("Created Car");
////                    Console.WriteLine("Created Car " + member.Username);
////                    Console.WriteLine("Created Car " + member.Password);
//                }
//            }
//            Console.ReadLine();
        }
    }
}
